<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>衣服相册</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        ul{
            list-style: none;
        }
        ul li{
            float: left;
            margin-left: 10px;
        }
    </style>
</head>
<body>
    <div>
        <img src="1.jpg" alt="" width="400px" id="show_imgs">
        <ul>
            <li><img src="1.jpg" alt="" width="50px" id="float1"></li>
            <li><img src="2.jpg" alt="" width="50px" id="float2"></li>
            <li><img src="3.jpg" alt="" width="50px" id="float3"></li>
            <li><img src="4.jpg" alt="" width="50px" id="float4"></li>
            <li><img src="5.jpg" alt="" width="50px" id="float5"></li>
            <li><img src="6.jpg" alt="" width="50px" id="float6"></li>       
        </ul>
    </div>
    <script>
        var onfloat1 = document.getElementById('float1')
        var image = document.getElementById('show_imgs')
        onfloat1.onmouseover = function(){
            onfloat1.style.border = 'red 2px solid'
            image.setAttribute('src','1.jpg')
        }
        onfloat1.onmouseleave = function(){
            onfloat1.style.border = 'none'
        }

        var onfloat2 = document.getElementById('float2')
        var image = document.getElementById('show_imgs')
        onfloat2.onmouseover = function(){
            onfloat2.style.border = 'red 2px solid'
            image.setAttribute('src','2.jpg')
        }
        onfloat2.onmouseleave = function(){
            onfloat2.style.border = 'none'
        }

        var onfloat3 = document.getElementById('float3')
        var image = document.getElementById('show_imgs')
        onfloat3.onmouseover = function(){
            onfloat3.style.border = 'red 2px solid'
            image.setAttribute('src','3.jpg')
        }
        onfloat3.onmouseleave = function(){
            onfloat3.style.border = 'none'
        }

        var onfloat4 = document.getElementById('float4')
        var image = document.getElementById('show_imgs')
        onfloat4.onmouseover = function(){
            onfloat4.style.border = 'red 2px solid'
            image.setAttribute('src','4.jpg')
        }
        onfloat4.onmouseleave = function(){
            onfloat4.style.border = 'none'
        }

        var onfloat5 = document.getElementById('float5')
        var image = document.getElementById('show_imgs')
        onfloat5.onmouseover = function(){
            onfloat5.style.border = 'red 2px solid'
            image.setAttribute('src','5.jpg')
        }
        onfloat5.onmouseleave = function(){
            onfloat5.style.border = 'none'
        }

        var onfloat6 = document.getElementById('float6')
        var image = document.getElementById('show_imgs')
        onfloat6.onmouseover = function(){
            onfloat6.style.border = 'red 2px solid'
            image.setAttribute('src','6.jpg')
        }
        onfloat6.onmouseleave = function(){
            onfloat6.style.border = 'none'
        }
        
    </script>
</body>
</html>